/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.server;

import cn.ac.iie.di.global.GlobalParas;
import org.apache.log4j.Logger;

/**
 *
 * @author Austin
 */
public class Monitor implements Runnable {
    
    static private final Logger logger = Logger.getLogger(Monitor.class.getName());
    
    @Override
    public void run() {
        try {
            while (true) {
                logger.info("轮询文件队列 size: " + GlobalParas.FILE_NAME_QUEUE.size());
                logger.info("读取json队列 size: " + GlobalParas.JSON_STR_QUEUE.size());
                logger.info("归档压缩队列 size: " + GlobalParas.JSON_TAR_QUEUE.size());
                Thread.sleep(5000);
            }
        } catch (Exception e) {
            logger.error(e, e);
        }
        
    }
    
}
